package generice;

import object.Point;

/**
 * 测试泛型上边界
 */
import java.util.ArrayList;
import java.util.HashSet;

public class Demo2 {
    public static void main(String[] args) {
        //可以不指定泛型
        TransferObject2 t1 = new TransferObject2();

        //编译不通过，因为Point没有继承自Collection
        //TransferObject2<Point> t = new TransferObject2<>();

        //ArrayList和HashSet都可以
        TransferObject2<ArrayList> t2 = new TransferObject2<>();
        TransferObject2<HashSet> t3 = new TransferObject2<>();
    }
}
